package com.cupdata.zicon.singleton;

/**
 * 饿汉式单例模式
 */
public class EagerSingleton {
    static {
        System.out.println("EagerSingleton 被加载");
    }
    private static final EagerSingleton eagerSingleton=new EagerSingleton();
    public static EagerSingleton getInstance(){
        return eagerSingleton;
    }
    private  EagerSingleton(){}
}
